package com.zh.baselibrary.api;

import com.zh.baselibrary.netutils.BaseResp;
import com.zh.model.CurrentTime;
import com.zh.model.EquipmentLogin;
import com.zh.model.cabinet.UserInfo;
import com.zh.model.home.TokenBean;
import com.zh.model.request.LoginInfo;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * @author EnzoChan
 * @create 2019/4/8
 * @desc:
 */
public interface IBookLoginService {

    /**
     * 刷卡登录
     *
     * @return
     */
    @POST("/irc/{schoolId}/login")
    Observable<BaseResp<UserInfo>> login(@Path("schoolId") String schoolId, @Body LoginInfo info);

    /**
     * 设备心跳
     *
     * @param equipmentCode
     * @return
     */
    @POST("/irc/equipment/{equipmentCode}/heartbeat")
    Observable<BaseResp<Object>> heartbeat(@Path("equipmentCode") String equipmentCode);


//    /**
//     * 设备登录
//     *
//     * @param equipmentLogin
//     * @return
//     */
//    @POST("/irc/equipment/login")
//    Observable<BaseResp<TokenBean>> equipmentLogin(@Body()EquipmentLogin equipmentLogin);

    /**
     * 设备登录
     *
     * @param equipmentCode
     * @return
     */
    @POST("/irc/equipment/login")
    Observable<BaseResp<TokenBean>> equipmentLogin(@Body() String equipmentCode);

    /**
     * 设备端基础信息上报
     */
    @POST("/irc/equipment/reportBaseInfo")
    Observable<BaseResp<CurrentTime>> reportBaseInfo(@Body()EquipmentLogin baseInfo);

}
